<?php
$db_lesson = pc_base::load_model('lesson_model');
$db_people = pc_base::load_model('people_model');
$db_team = pc_base::load_model('team_model');
$db_member = pc_base::load_model('member_model');
$arr_lesson = $db_lesson->select("p_catid=$catid and p_id=$id",'*','','listorder asc');
?>

{template "content","header"}
{pc:get sql="select * from phpcms_commit where status=1 and a_catid=$catid and a_id=$id order by id desc" num="100" return="all_commit"}{/pc}
{template "content","header_nav_back_ref"}
<script type="text/javascript" src="{JS_PATH2}commit.gaojian.js?ver={VERSION}"></script>

<div class="h_48"></div>
<!-- main -->
<main class="main ">
<section class="pIntroduction">
	<div class="pIntroductionImg">
		<img src="{$pic_push}" width="100%">
		<div class="num">
			<div class="fl">席位：<em class="green">{$student_limit}</em> 个</div>
			<div class="fr">已有<em>{$student_has}</em>人报名</div>
		</div>
	</div>
	<div class="courseDetail11 bgwhite">
		<h1>{$title}</h1>
		<p class="clearfix">
			<span>开课时间：<em>{date('Y-m-d',strtotime($class_time1))}</em></span>
		</p>
		<p>地点：{$class_where}</p>
		<div class="huiyuanjia">会员价：<span class="sp1">{if $price_cut}￥{price2cn($price_cut)}{else}免费{/if}</span><span class="sp2">{price2cn($price_base)}</span>
	</div>

</section>

<script src="{JS_PATH2}tab.js"></script>
<script type="text/javascript">
$(function() {
	$(".content").all_tab({
		effect: "fade",
		trigger: "click",
		delayTime: 10
	});

	/*var _window_width = document.body.clientWidth;
	$('.pIntroductionImg img').height(_window_width * 9 / 16);*/
});
</script>
<div class="content">
<!-- 	<ul class="nav_course1 tab border1 clearfix">
		<li><a href="javascript:void(0);">课程介绍</a></li>
		<li><a href="javascript:void(0);">相关课程</a></li>
		<li><a href="javascript:void(0);">师资团队</a></li>
	</ul>
 -->
<!-- 课程介绍 -->

	<!-- <div class="class_t">课程介绍</div> -->
	<!-- <div class="courseDetail3">{$small_content}</div> -->

	<div class="padding15 bgwhite borderNone">
<!-- {php $teacher=$db_people->pkhs($one_teacher)}
{if !!$teacher}
		<div class="courseDetail2 courseDetail2_j">
			<div class="t2">授课讲师<a href="javascript:void(0);" class="d_guan fr js_like" data-catid="{$teacher[catid]}" data-id="{$teacher[id]}">关注</a></div>
			<div class="courseDetail22 clearfix">
				<div class="courseDetail22_pic fl">
					<a href="{$teacher[url]}"><img src="{$teacher[thumb]}"></a>
				</div>
				<div class="courseDetail22_con">
					<a href="{$teacher[url]}">
						<div class="t2">{$teacher[title]}</div>
						<div class="con11">{$teacher[small_content]}</div>
					</a>
				</div>
			</div>
		</div>
{/if} -->
{php $team=$db_team->pkhs($one_team)}
{if !!$team}
		<div class="courseDetail2 courseDetail2_j">
			<div class="t2">授课机构<a href="javascript:void(0);" class="d_guan fr js_like" data-catid="{$team[catid]}" data-id="{$team[id]}">关注</a></div>
			<div class="courseDetail22 clearfix">
				<div class="courseDetail22_pic fl">
					<a href="{$team[url]}"><img src="{$team[thumb]}"></a>
				</div>
				<div class="courseDetail22_con">
					<a href="{$team[url]}">
						<div class="t2">{$team[title]}<?=v2html($team[v])?></div>
						<div class="con11">{$team[small_content]}</div>
					</a>
				</div>
			</div>
		</div>
{/if}
		<div class="courseDetail2">
		   <div class="con1111 contendata"><div style="margin:0 5px">{$content}</div></div>
		</div>
		<!-- <div class="courseDetail2_t margin2">课程大纲</div>
		<ul class="courseCatalog  margin2 bgwhite">
		{loop $arr_lesson $lesson}
			<li class="clearfix">
				<a href="javascript:void(0);">
					<i class="radius1 fl"></i>
					<div class="fr con13">
						<i class="rowleft"></i>
						<div class="con14">
							<p>第{$n}课时：{$lesson[title]}</p>
							<span class="con12">{$lesson[small_content]}</span>
						</div>
					</div>
				</a>
			</li>
		{/loop}
		</ul> -->


	
	</div>

<!-- 课程设置 -->

<!-- <ul class=" tab_con oListclass">
{pc:content action="lists" catid="1" num="5" order="listorder desc"}
{loop $data $c_one}
{if $id!=$c_one[id]}
{php $team=$db_team->pkhs($c_one[one_team])}
{php $teacher=$db_people->pkhs($c_one[one_teacher])}
	<li>
		<a href="{$c_one[url]}">
			<div class="oListclasstime">
				<span class="time1 fl">{date('Y-m-d',$c_one[class_time1])}</span>
				<span class="peo fr">{$c_one[num_view]}</span>
			</div>
			<div class="oListclasscon clearfix">
				<div class="pic1 fl"><img src="{$c_one[thumb]}"><em>席位：{$c_one[student_limit]}</em></div>
				<div class="oListclasscon_rg">
					<div class="oListclasscon_rg_t">{$c_one[title]}</div>
					<div class="oListclasscon_rg_name">{$team[title]}<?=v2html($team[v])?></div>
					<div class="oListclasscon_rg_teacher clearfix">
						<span class="fl">讲师：{$teacher[title]}</span> 
						<div class="oListclasscon_rg_teacher_price fl">
							{if $c_one[price_cut]}
								<i>￥{price2cn($c_one[price_cut])}</i>
							{else}
								<i class="free">免费</i>
							{/if}

							<em>{price2cn($c_one[price_base])}</em>
						</div>
					</div>
				</div>
			</div>
		</a>
	</li>
{/if}
{/loop}
{/pc}
</ul> -->

<!-- 师资团队 -->
<!-- <ul class="tab_con courseStudentList bgwhite">
{loop my_explode(',',$arr_teacher) $t_one}
{php $teacher=$db_people->pkhs($t_one)}
	<li>
		<a href="{$teacher[url]}" class="clearfix">
			<img src="{$teacher[thumb]}" class="img1 fl">
			<div class="courseStudentListCon">
				<div class="t6"><span>{$teacher[title]}</span><span>{$teacher[titlename]}</span></div>
				<p>{$teacher[small_content]}</p>
			</div>
		</a>
	</li>
{/loop}
{/pc}
</ul> -->
	<!-- 讲师相关 -->
	<div class="class_t">课程评价</div>
	<div class="commit-list bgwhite padding10" style="padding:10px">
		<div class="teacherEvaluation_t clearfix">
			<div class="teacherEvaluation_t_lf fl">课程评价：<?=star2html($all_commit)?></div>
			<div class="teacherEvaluation_t_num fr">共有<em><?=count($all_commit)?></em>人评分</div>
		</div>
		<div class="myEvaluation clearfix">
			<img src="{IMG_PATH2}icon/peoBg.jpg" class="fl"> 
			<div id="myEva" class="fr">我要评论......</div>
		</div>
		<ul class="teacherEvaluation">
{loop $all_commit $one_commit}
{php $user=$db_member->pkhs($one_commit[uid],'userid')}
			<li>
				<div class="photo clearfix">
					<img class="fl" src="{$user[thumb]}">{if $user[realname]!=''}{$user[realname]}{else}高见会员{/if}
					<div class="teacherEvaluation_t_lf fr"><?=star2html($one_commit['star'])?></div>
				</div>
				<div class="teacherEvaluation1">
					{$one_commit[content]}
					<em>{$one_commit[ymdhis]}</em>
				</div>
			</li>
{/loop}
		</ul>
	</div>

</div>
</main>
<!-- / main -->
<div class="h_55"> </div>
<footer class="ft_course">
	<ul class="clearfix">
		<li class="icon_share"><a href="javascript:void(0);"><i></i><span>{$num_share}</span></a></li>
		<li class="icon_zan"><a href="javascript:void(0);" data-catid="{$catid}" data-id="{$id}"><i></i><span>{$num_like}</span></a></li>
		<li class="icon_sh"><a href="javascript:void(0);" class="btn_att js_like" data-catid="{$catid}" data-id="{$id}" data-text="0"><i></i></a></li>
		<li class="icon_mycourse"><a href="{MEMBER_PATH}&c=apply&a=doclass&catid={$catid}&id={$id}">立即报名</a></li>
	</ul>
</footer>
<!-- 评价弹窗 -->
<div class="js-commit" style="display:none">
<div class="js-commit-bak"></div>
<div class="js-commit-body">
<div class="margin2">
	<div class="js-commit-star">我要评价：<span class="star5" data-catid="{$catid}" data-id="{$id}" data-star="5"></span></div>
	<textarea></textarea>
</div>
<div class="btn_tijiao clearfix">
	<div class="btn_tijiao_lf fl">
		每日第一次评论可获得 <em>30</em> 学分
		<span><i></i>学分说明</span>
	</div>
	<input type="submit" value="提交评论" id="js-commmit-send" >
</div>
</div>
</div>
{template "content","share"}

{template "content","footer"}
